<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<body class="page-header-fixed">
	<div>
		<a class="btn blue" href="javascript:;"
			data-target="#paymentGatewayModel" data-toggle="modal"
			ng-click="addPaymentGateway();"> <i class="fa fa-plus"></i> 新增
		</a>
	</div>
	<table class="table table-striped table-bordered table-hover"
		id="table_1">
		<thead>
			<tr>
				<th>运营商</th>
				<th>渠道</th>
				<th>运营商在第三方支付的账户</th>
				<th>公钥</th>
				<th>签名方式</th>
				<th>备注</th>
				<th>是否启用</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<tr class="odd gradeX"
				ng-repeat="paymentGateway in paymentGatewaylist  track by $index"
				on-loaded="{{$last}}" target-table="table_1">
				<td><span
					ng-bind="paymentGateway.merchantCode | getValueInArgFilter : selMerchantMap : 'name'"></span>
				</td>
				<td><span
					ng-bind="paymentGateway.channelCode | getValueInArgFilter : selPayChannelMap :'channelName'"></span>
				</td>
				<td><span ng-bind="paymentGateway.accountId"></span></td>
				<td><span ng-bind="paymentGateway.publicKey"></span></td>
				<td><span ng-bind="paymentGateway.signType"></span></td>
				<td><span ng-bind="paymentGateway.remark"></span></td>
				<td><span
					ng-bind="paymentGateway.isValid | getValueInStaticFilter : 'validArray'"></span>
				</td>
				<td><a class="btn" href="javascript:;"
					data-target="#paymentGatewayModel" data-toggle="modal"
					ng-click="updatePaymentGateway(paymentGateway);"> 修改 </a></td>
			</tr>
		</tbody>
	</table>
	
<div id="paymentGatewayModel" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
						<h4 class="modal-title">支付网关新增/修改</h4>
					</div>
					<div class="modal-body form">
						<div class="form-group">
							<div class="row">
								<label class="col-sm-4 control-label text-right">运营商</label>
								<div class="col-sm-8">
									<div class="input-group">
										<select class="form-control"  ng-disabled="updateDisabled"
										ng-options="selMerchant.merchantCode as selMerchant.name for selMerchant in selMerchantList" 
										ng-model="selectedPaymentGateway.merchantCode"  >
										<option value="">请选择运营商</option>
										</select>
									</div>
								</div>
							</div>
							<div class="row">
								<label class="col-sm-4 control-label text-right">渠道</label>
								<div class="col-sm-8">
									<div class="input-group">
										<select class="form-control" ng-disabled="updateDisabled"
										ng-options="selPayChannel.channelCode as selPayChannel.channelName for selPayChannel in selPayChannelList" 
										ng-model="selectedPaymentGateway.channelCode">
										<option value="">请选择渠道</option>
										</select>
									</div>
								</div>
							</div>
							<hr />
					        <div class="row">
								<label style="padding-right: 0px;margin-left: -1em;margin-right: 1em;" class="col-sm-4 control-label text-right">运营商在第三方支付的账户</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate"  
										key="maxlength_20" ng-model="selectedPaymentGateway.accountId" />
									</div>
						    	</div>
							</div>
					        <div class="row">
								<label class="col-sm-4 control-label text-right">公钥</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate" 
										key="maxlength_200" ng-model="selectedPaymentGateway.publicKey" />
									</div>
						    	</div>
							</div>
					        <div class="row">
								<label class="col-sm-4 control-label text-right">签名方式</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate" 
										key="maxlength_10" ng-model="selectedPaymentGateway.signType" />
									</div>
						    	</div>
							</div>
					        <div class="row">
								<label class="col-sm-4 control-label text-right">备注</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate" 
										key="maxlength_128" ng-model="selectedPaymentGateway.remark" />
									</div>
						    	</div>
							</div> 
							<div class="row">
								<label class="col-sm-4 control-label text-right">是否启用</label>
								<div class="col-md-8">
									<div class="radio-list">
										<label class="radio-inline">
											<input ng-model="selectedPaymentGateway.isValid" type="radio"  value="1" 
											ng-selected="selectedPaymentGateway.isValid==1">
												启用
										</label>
										<label class="radio-inline">
											<input ng-model="selectedPaymentGateway.isValid" type="radio"  value="0" 
											ng-selected="selectedPaymentGateway.isValid==0">
												停用
										</label>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i>关闭</button>
						<button type="button" class="btn btn-primary" ng-click="savePaymentGateway();"><i class="fa fa-check"></i>保存</button>
					</div>
				</div>
			</div>
		</div>
</body>
</html>